//package model.jgap;
//AM: this code was used when tryign to tune output to match real market prices.. a variable set of traders was evolved
//import model.market.Position;
//import model.trader.Trader;
//
//import org.jgap.Configuration;
//import org.jgap.Gene;
//import org.jgap.InvalidConfigurationException;
//import org.jgap.impl.CompositeGene;
//import org.jgap.impl.IntegerGene;
//
//public class TraderPositionComposite extends CompositeGene {
//	
//	public TraderPositionComposite(Configuration conf,TraderGene gene) throws InvalidConfigurationException{
//		super(conf);
//		addGene(gene);
//		addGene(new IntegerGene(conf,0,100000));
//	}
//	
//	protected TraderPositionComposite(Configuration conf) throws InvalidConfigurationException{
//		super(conf);
//		
//	}
//	
//	
//	public Trader getTrader(){
//		return ((TraderGene)geneAt(0)).getTrader();
//	}
//	
//	public Position getPosition(){
//		return new Position(((IntegerGene)geneAt(1)).intValue());
//	}
//
//	
////	AM: dodgy copy paste all over the custom gene types..
//	protected Gene newGeneInternal() {
//	    try {
//	      TraderPositionComposite compositeGene = new TraderPositionComposite(getConfiguration());
//	      compositeGene.setConstraintChecker(getConstraintChecker());
//	      Gene gene;
//	      int geneSize = m_genes.size();
//	      for (int i = 0; i < geneSize; i++) {
//	        gene = (Gene) m_genes.get(i);
//	        compositeGene.addGene(gene.newGene(), false);
//	      }
//	      return compositeGene;
//	    }
//	    catch (InvalidConfigurationException iex) {
//	      throw new IllegalStateException(iex.getMessage());
//	    }
//	  }
//}
